nv-rs Windows preview
=====================

nv-rs runs Fallout: New Vegas from your own copy of the game, on the game's code translated to
Rust. This is a PREVIEW: Windows only, with bugs left. It has only been run on one PC so far, the
maintainer's, so your PC may turn up problems nobody has seen. Please tell us (see the end).

nv-rs is an independent project. It is not affiliated with, endorsed by or sponsored by Bethesda,
ZeniMax, Obsidian or Microsoft. This package has no game files in it. You need your own installed
Fallout: New Vegas, version 1.4.0.525 (the last update).


Start
-----
1. Extract the whole ZIP to a folder of its own that is NOT inside Documents, AppData, Program Files
   or the game's folder. For example C:\Games\nv-rs. It doesn't need administrator rights.
2. Double-click Play.exe.

Windows will probably warn you, because the program is new and not signed. See "If Windows or your
antivirus objects" below.

Play.exe opens nv-rs's launcher: a window in the look of the game's own terminals (its font, colour
and lines are read from your installed game). Choose with the arrow keys and Enter, or the mouse:
> Play starts the game, > Play with mods (shown when you have mods) plays with them, > Mods
installs a mod from its archive in the mods folder (or removes one), answering its questions at
the launcher's prompt, > Import saves (shown when Documents\My Games\FalloutNV\Saves has
saves) copies them into nv-rs's own folder, each with its .nvse file, asking before it replaces a
different save of the same name (yours in Documents are only read), > Settings
has the window or borderless, resolution, anti-aliasing, game fixes, frame limit and more, and
opens two lists: New lighting and more (the new lighting still being tried) and Fixes one by one
(each of nv-rs's fixes on or off; each follows Game fixes until you choose it there), saved at
once for the next start; > Exit closes it. The window has no title bar: drag it by its
background (anywhere but an entry) to move it;
> Exit, Esc on the first screen or Alt+F4 closes it. The first time it types the game's terminal
intro once. Its text types as fast as the game's
terminals do, and, as there, the entries can be chosen once a screen's text is all in.
Where the launcher differs from the game's terminals: Esc and Enter finish the intro (in the game
only a click does, which works here too); while a screen types, the first key you press or a click
shows the whole text at once and does nothing else (the game has no such key); with "Frame rate
limit in menus" set to No limit it types as at 120 frames a second (the game would follow your
monitor); and it times the typing by its own exact clock where the game's runs in coarser steps.
It plays the game's own terminal sounds (the fan hum, the typing, the click and the focus
sound of its entries), read from your installed game, at your game's effects volume; Settings >
Launcher sounds turns them off. It is silent while its window is minimised or not the one in
front (as the game pauses), and from the moment you choose Play.

The first start finds your game (Steam, GOG, Epic, or it asks: type the game's folder in the
launcher or paste it with Ctrl+V, or drop the folder onto its window), checks its version, reads
your graphics card and
sound device (about 20 seconds; the launcher says what it is doing) and starts the game. The
launcher steps aside while you play, and closes when the game ends; if the game stops with an
error, it says what happened and can open the logs folder. Later starts take a moment. When your
graphics card, drivers, monitors, sound device, Windows language or Windows version change, nv-rs
notices and reads them again.

  Play.exe               the launcher (above): Play, Play with mods (see mods\READ ME.txt), Mods
                         (install a mod from its .7z, .zip or .fomod archive in the mods folder,
                         or remove one), Import saves (copies your saves from Documents\My
                         Games\FalloutNV; those stay as they are) and Settings are its entries

Use Exit Game in the game's menu to quit. Saves reach the disk within about 5 seconds of being made,
so wait a moment after saving before you close the window with its X.


Your files
----------
nv-rs never writes to your game folder, your Documents or your AppData. Saves, settings, logs and
reports all stay in the userdata folder here. To go back to the original game, just start it: nothing
of it has changed. To remove nv-rs, delete this folder (your saves in userdata go with it).
Playing with mods links your game's files into userdata\modgame rather than copying them. A link is
another name for the same file, so if you uninstall the game while that folder is still here, the
disk space stays used until you delete the nv-rs folder too.

Your real saves are only read, and only when you choose Import saves in the launcher. Saves you make here are in
userdata\game\Documents\My Games\FalloutNV\Saves. They are normal saves; nv-rs doesn't copy them back
for you.

The first start takes your settings from the game's own launcher if you have run it (it copies them,
and your real ones stay as they are). If not, it starts on the game's High preset at your desktop's
size. Play.exe's Settings and the game's own menu change them.

Either way the game starts in a borderless window that fills the screen. For the game's own window
instead, choose Window under Display mode in Play.exe's Settings. That is bBorderless=0 in Fallout.ini's
[nv-rs Display] section (Bug fixes, below, says where the file is). With 1, or with no such line,
the window is borderless.

Press F11 in the game to show or hide a frame-rate counter in the top-right corner: frames a second
and, under it, the slowest frame of the last second in milliseconds (a stutter shows there). It is off
at the start unless you choose "Shown" under Frame rate counter in Play.exe's Settings (bShowFrameRate=1 in
the same section). It shows with the Vulkan renderer only. With Vulkan, F11 is kept for the counter:
it cannot be bound to anything in the game's controls or by mods; with Direct3D 9 it is the game's.

Press Shift+F11 in the game to switch the new lighting (Sun shadows and Ambient occlusion under New lighting
and more in Play.exe's Settings) while you play: each press goes to the next of both, the sun shadows
alone, the ambient occlusion alone and neither, and the top-right corner says which for a few seconds.
Settings decides how a game starts. Once on, the sun shadows keep about 256 MB of video memory until
the game ends, so switching them again is instant. Vulkan only.


Bug fixes
---------
Bug fixes are on by default. With them, the frame rate isn't held to the original's limit, the game's
time keeps pace with real time at high frame rates (the original runs fast there), and your character
lands on the floor after a jump instead of hovering a little above it. Menus run at up to 120 frames a
second (loading screens as fast as they can), and a dragged body is pulled as hard at any frame rate.

To play the original game's behaviour instead, open Play.exe's Settings and choose "Vanilla (the original
game)" under Game fixes. Settings can also set a frame limit (60, 120, 144 and so on) or no limit,
which is the default, and a frame limit in menus (120 unless you choose another, or none). The frame
limits only work with the fixes on. Settings keeps them in the game's own Fallout.ini, in
userdata\game\Documents\My Games\FalloutNV (and the same under userdata\mods), in sections named
[nv-rs ...] (usually at the top of the file): sPreset=fixes or vanilla, iFrameLimit=0 (no limit) or a number, iMenuFrameLimit=120,
0 or a number. You can change them there too; a note above each line says what it does.


Game threads
------------
The game's threads (the main one, the AI, loading and sound) run side by side on your processor's
cores, as in the original. If the game misbehaves in a way it didn't with the previous preview (it
stops, hangs, or something acts oddly), open Play.exe's Settings, choose "One at a time (slower)" under Game
threads, and please tell us. Settings keeps that choice in Fallout.ini as bSteppedThreads=1;
with 0 the threads run side by side.

The game's drawing is handed to a thread of its own (the original draws on its main thread), which
makes busy places faster. If something looks wrong or the game stops in a way it didn't with the
previous preview, open Play.exe's Settings, choose "Main thread (slower)" under Drawing thread, and please
tell us. Settings keeps that choice in Fallout.ini as bRenderThread=0; with 1 the drawing has its
own thread.

The game keeps its speed when its window is not the active one: nv-rs asks Windows not to slow it
down or move it to the processor's slower cores while it is in the background. On a laptop this
uses more power and makes more heat while the game runs behind other windows. To let Windows decide
instead, set bNotBackground=0 in Fallout.ini's [nv-rs Threads] section.


Renderer
--------
The game draws on Vulkan (on a graphics card without Vulkan, on Direct3D 12), with the original's
shaders and look. If something looks wrong or the game stops while drawing in a way it didn't with
the previous preview, open Play.exe's Settings, choose "Direct3D 9 (the original's)" under Renderer, and
please tell us. Settings keeps that choice in Fallout.ini as sRenderer=d3d9; with sRenderer=vulkan,
or with no such line, the game draws on Vulkan. Where neither Vulkan nor Direct3D 12 can draw, the
game draws with Direct3D 9 by itself.


What works
----------
The whole game runs on its translated code: the opening, the open world, quests, combat, V.A.T.S.,
the Pip-Boy, saves and the DLCs, with the original graphics (drawn on Vulkan) and sound (through your
own DirectX).
Regular .esp and .esm mods work.
Game pads work: an Xbox-style pad, or a PlayStation pad (DualSense, DualSense Edge, DualShock 4)
by cable or Bluetooth, with rumble. The game shows Xbox button pictures: A is Cross, B is Circle,
X is Square, Y is Triangle, Back is Create (Share on a DualShock 4) and Start is Options. The PS
button and the touchpad do nothing.
Other pads work too, without rumble, if SDL's controller database knows them (764 models, such as
8BitDo and Logitech pads in their DirectInput modes): their buttons are put where an Xbox pad has
them. A pad it doesn't know, or whose line does not fit its own buttons and sticks, is named in the
log; a line for it in SDL's own format (with platform:Windows) can go in a file called
gamecontrollerdb.txt in the "nv-rs mod files" folder beside your Saves folder, and the log then
says how many lines it took from there. A pad SDL counts as Xbox-style is read through XInput as
an Xbox pad, and a line for it is not used. To keep nv-rs from reading a pad at all, name it in
the SDL_GAMECONTROLLER_IGNORE_DEVICES variable as SDL games take it (0xVVVV/0xPPPP, its vendor and
product ids, several separated by commas).
While a pad is connected, the game takes its controls from the pad, not from the keyboard and
mouse, as the original does with an Xbox pad. That includes a PlayStation pad that is only plugged
in to charge. To play with keyboard and mouse while a pad is connected, turn off "360 Controller"
under Controls in the game's Settings menu; "Vibration" there turns rumble off.


What doesn't yet
----------------
- Script extenders: xNVSE, JIP LN NVSE and UI Organizer are built in (JIP and UIO with the bug
  fixes on). Other plugins (.dll files, such as MCM's plugin, JohnnyGuitar NVSE and ShowOff) don't
  work yet, so mods that also need those still say so.
- Game pads that are not Xbox-style, not one of those three PlayStation pads and not in SDL's
  controller database don't work yet, unless you add a line for them (above).
- It is slower than the original. On the maintainer's PC (a laptop with an RTX 5070 Ti, at 2560x1440
  with 8x anti-aliasing), with the bug fixes on, about 103 frames a second in Doc Mitchell's house and
  about 44 in Goodsprings. The original runs at about 120 in Doc's house. Your numbers will differ.
- Memory: the game's code still has the original's 4 GB limit, about 3.2 GB of it for the game's own
  use. A very heavy mod list can run out, as in the original. Removing this limit is planned.
- Known bugs: fitting a second weapon mod can stop the game. Sound can crackle when frames are slow.
  Some settings may not change anything. There are others we don't know about.
- A Steam, GOG or Epic overlay, achievements and the game's launcher are not used.
- Not tested yet, because they have only one PC to run on: other graphics cards (AMD, Intel, older
  NVIDIA), sound set to anything but 7.1 or stereo, GOG and Epic copies, languages other than English,
  Windows 10. GOG, Epic and some regional copies may be refused, with a message that says so.
- PlayStation pads (DualSense, DualSense Edge, DualShock 4, by cable or Bluetooth) are built from
  their published layouts and have not been tried with a real pad yet, nor with Steam Input or
  DS4Windows running alongside. Nor have the pads read through SDL's controller database. Please
  tell us how yours does.
- A database pad connected by Bluetooth that drops out (out of range, out of battery) keeps its last
  sticks and buttons until Windows takes the device away, as such pads may send nothing while
  nothing changes.


Problems at the start
---------------------
When nv-rs can't start it says why in a window, for example: no game found; the wrong version of the
game; DirectX's d3dx9_38.dll missing (install "DirectX End-User Runtimes (June 2010)" from Microsoft);
the folder's path too long or in a place it shouldn't be. With no sound device the game starts silently.
A sound device plugged in, unplugged or chosen as the default while the game or the launcher runs
is followed: after a short gap (under a second) the sound goes on from the new default device, and
sounds that were playing carry on where they would be. If no device answers after a loss it keeps
trying once a second. A game started with no sound device at all stays silent until its next start.
Everything it said is in userdata\logs\launcher.log.


If Windows or your antivirus objects
------------------------------------
The programs here are not signed, and few people have run them, so:
- Windows SmartScreen may say "Windows protected your PC". Click "More info", then "Run anyway",
  once you have decided you trust this download.
- On Windows 11 with Smart App Control turned on, unsigned programs are blocked and there is no such
  button. nv-rs can't run on such a PC without turning that off, and we don't ask you to.
- An antivirus may stop or remove Play.exe or app\FalloutNV.exe, because they are new and start other
  programs. Download only from the project's own page. Compare the ZIP's SHA256 with the one published
  with it. The source for every file is at https://github.com/slaterain/nv-rs (BUILD.txt names the exact
  version).
Don't turn off your security software for this.

app\FalloutNV.exe is nv-rs's own program, not the game's. It has that name because NVIDIA's driver fixes
and Windows' sound settings for the game go by the name.


Reporting a problem
-------------------
https://github.com/slaterain/nv-rs/issues

Press F12 in the game when you see something wrong. You hear a beep, and a numbered folder appears
in userdata\reports with a picture and the log so far. Add your words to its note.txt and attach the
folder, zipped. If the game stopped, the launcher keeps a crash report in userdata\reports (a
crash-<date and time> folder, your user name and folder names taken out of it): attach its
report.txt and log.txt, and launcher.log from userdata\logs. At its first start the launcher asks
whether crash reports may be sent to nv-rs's developers through Sentry (sentry.io): nothing is
sent without your yes, and Settings, Crash reports, changes the answer. A report sent is the one
kept, and includes where you were in the game (its log's F12 and hitch lines) and the place and
note of an F12 report made in that run; envelope.txt in its folder is what was sent, or would
have been.
Say what you did just before, and your graphics card, Windows version and game store.

Logs can show your Windows user name in folder paths: look through them first if that matters to you.
Never attach game files. Please compare with the original game when you can: if it behaves the same
there, it isn't an nv-rs bug.

Licence terms and notices are in LICENSE, LEGAL.md, THIRD-PARTY-NOTICES.txt and the licenses folder.
